/*
** adv_prison.h
*/

#ifndef ADV_PRISON_H_INCLUDED
#define ADV_PRISON_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "hero_ptr.h"
#include "stationary_adventure_object.h"

class t_adv_prison : public t_stationary_adventure_object
{
	public:
        
		t_adv_prison( std::string const& source );
		virtual void    activate_trigger( t_army* army, t_adv_map_point const& point, 
									      t_direction direction, t_adventure_frame* frame );
		virtual float	ai_value( t_adventure_ai const& ai, t_creature_array const& army, int move_cost ) const;
		virtual int     get_version() const;

		virtual bool    preplacement( t_adventure_map& map, int pass );
		virtual void	process_new_day();
		virtual bool    read( std::streambuf&					 stream, 
							  t_qualified_adv_object_type const& type,
							  int								 version );
		virtual bool	read_from_map( std::streambuf&		buffer,
									   t_progress_handler* );
		virtual void	read_postplacement( t_adventure_map& map );
		virtual void	right_click( t_mouse_event const& event,
									 t_adventure_frame* adventure_frame );
		virtual bool    write( std::streambuf& stream ) const;

	private:
		t_hero_ptr      m_hero;
		bool			m_was_old_format; // Old-style prisons, without hero data
};

#endif // ADV_PRISON_H_INCLUDED
